/* 
 * File:   TransformMatrix.h
 * Author: brady
 *
 * Created on September 6, 2011, 6:20 PM
 */

#ifndef TRANSFORMMATRIX_H
#define	TRANSFORMMATRIX_H

#include <core/Vector3D.h>

using namespace std;
class TransformMatrix {
public:
    const static int X_AXIS = 0;
    const static int Y_AXIS = 1;
    const static int Z_AXIS = 2;
    const static int R0 = 0;
    const static int R1 = 4;
    const static int R2 = 8;
    const static int R3 = 12;
    const static int C0 = 0;
    const static int C1 = 1;
    const static int C2 = 2;
    const static int C3 = 3;

    TransformMatrix();
    void setZero();
    void setIdentity();
    Vector3D transform(const Vector3D& vector);
    Vector3D transposeTransform(const Vector3D& vector);
    void translate(double dx, double dy, double dz);
    void rotate(double degrees, int axis);
    void scale(double sx, double sy, double sz);
    virtual ~TransformMatrix();
    void display();
    void multiply(TransformMatrix& m);
    TransformMatrix getInverse(); //THIS IS EXPENSIVE
    void verifyInverse();
private:

    double Matrix[16];

};

#endif	/* TRANSFORMMATRIX_H */
